﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Runtime.Serialization;
using System.ServiceModel;
using System.Text;

using ACL.Supervisor;

namespace ACL.Comm
{
    public interface IAgentContractCallBack
    {
        [OperationContract(IsOneWay = true)]
        void CallBackFUnction(string msg);

        [OperationContract(IsOneWay = true)]
        void UpdateAgentListAdd(Agent agent);

        [OperationContract(IsOneWay = true)]
        void UpdateAgentListRemove(Agent agent);

        [OperationContract(IsOneWay = true)]
        void DownloadFile(string FileToDownload, string downloadto, string SaveAs, int  Start);

          [OperationContract(IsOneWay = true)]
         void UploadFile(string FileToUpload);






    }

    [ServiceContract( CallbackContract=typeof(IAgentContractCallBack))]
    public interface IAgentPool 
    {
        [OperationContract]
        List<Agent> GetAgents();
        
        [OperationContract]
        void NormalFunction();

        [OperationContract]
        void Whisper(Message message);

        [OperationContract]
        bool CanIGetSomeHelp(AgentTracker message);


        [OperationContract]
        AgentTracker CanIHelp(Agent message);


        [OperationContract]
        void Shout(Message message);

        [OperationContract]
        List<Message> GetUnReadMessages(Agent agent);

        [OperationContract]
        List<Message> GetAllReadMessages(Agent agent);
        [OperationContract]
         List<Message> GetAllMessages(Agent agent);
        
        [OperationContract]
         void Subscribe(Agent agent);
        [OperationContract]
         void UnSubscribe(Agent agent);
        [OperationContract]
         void TearDownService();

        [OperationContract]
        bool TaskComplete();
    }
}
